package com.yuyou.train.stream;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

/**
 * 
 *
 */
@EnableBinding(value = {Sink.class})
public class SinkReceiver {

	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@StreamListener(Sink.INPUT)
	public void receive(Object payload) {
	logger.info("Received: " + payload);
	}
	 
	@StreamListener("input2")
	public void receive2(Object payload) {
	logger.info("Received22222222: " + payload);
	}
	
	@StreamListener("input3")
	public void receive3(Object payload) {
	logger.info("333333333333333: " + payload);
	}
	
}
